<template>
	<view>
	<view class="content" style="width: 100%;height: 300px;background-color: #00D6B2;" >
		<view></view>
		<image class="logo" :src="src" @click="chooseImg()"></image>
		<view class="text-area">
			<text  style="color: #000000;font-size: 50rpx;">{{username}}</text>
		</view>
	</view>
	<view class="main" style="margin-top: 50rpx;">
		<view class="box">
			<view style="display: flex;
		justify-content: center;
		width: 100%;
		height: 50px;">
				<view class="txt">年龄：{{age}}</view>
				<view class="txt">性别：{{sex}}</view>
			</view>
			<view  class="part" style="margin-top: 30rpx;">
				<view class="txt">今日推荐的音乐您已点赞了{{music}}次</view>
			</view>
			<view class="part">
				<view class="txt">今日推荐的文章您已点赞了{{wen}}次</view>
			</view>
			<view class="part">
				<view class="txt">今日推荐的单词您已点赞了{{word}}次</view>
			</view>
			<view style="display: flex;
		justify-content: center;
		width: 100%;
		height: 50px;">
				<view class="txt">今日推荐的精句您已点赞了{{juzi}}次</view>
			</view>
		</view>
	</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				src:"",
				username:"",
				sex:"男",
				music:0,
				wen:0,
				点赞:0,
				age:0,
				word:0,
				juzi:0,
			}
		},
		onLoad() {
			this.username = getApp().globalData.userName
			this.src = getApp().globalData.图片
			this.music = getApp().globalData.music
			this.wen = getApp().globalData.wen
			this.点赞 = getApp().globalData.点赞
			this.age = getApp().globalData.age
			this.word = getApp().globalData.word
			this.juzi = getApp().globalData.juzi
			// this.性别 = getApp().globalData.性别
			this.sex = getApp().globalData.sex
		},
		methods: {
			chooseImg(){
				uni.chooseImage({
					count:1,
					success:res=>{
						this.src = res.tempFilePaths[0];
						getApp().globalData.图片 = this.src
						
					}
				})
			}
		}
	}
</script>

<style>
	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}

	.logo {
		height: 300rpx;
		width: 300rpx;
		margin-top: 150rpx;
		margin-left: auto;
		margin-right: auto;
		margin-bottom: 50rpx;
	}

	.text-area {
		display: flex;
		justify-content: center;
	}
	.input{
		width: 80%;
		font-size: large;
	}
	.txt{
		font-size: large;
		width:80%;
		background-color: #ffffff;
		display: flex;
		flex-direction: column;
		justify-content: center;
	}
	.part{
		display: flex;
		justify-content: center;
		width: 100%;
		height: 50px;
		border-bottom:#DCDCDC 1px solid;
	}
	.box{
		width: 90%;
		height: 200px;
		background-color: #ffffff;
	}
	.main{
		display: flex;
		justify-content: center;
		width: 100%;
	}
</style>
